<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"/>

<xsl:template match="*">
    <xsl:copy>
        <xsl:apply-templates/>
    </xsl:copy>   
</xsl:template>

<xsl:template match="PLANETE">
    <xsl:copy use-attribute-sets="denombrer">
        <xsl:apply-templates/>
    </xsl:copy>   
</xsl:template>

<xsl:attribute-set name="denombrer">
    <xsl:attribute name="numero"><xsl:number/></xsl:attribute>
    <xsl:attribute name="total"><xsl:value-of select="count(//PLANETE)"/></xsl:attribute>
</xsl:attribute-set>

</xsl:stylesheet>
